<?php

class LoginForm extends BaseForm {
  public function setup()
  {
    $this->setWidgets(array(
      'email'     => new sfWidgetFormInputText(),
      'password'  => new sfWidgetFormInputPassword(),
      'hpassword'  => new sfWidgetFormInputHidden(),
    ));

    $this->setValidators(array(
      'email'     => new sfValidatorString(array('max_length' => 128)),
      'password'  => new sfValidatorPass(),
      'hpassword'  => new sfValidatorString(array('max_length' => 32)),
    ));

    $this->widgetSchema->setNameFormat('%s');
    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
    parent::setup();
  }
}